home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 60.zip
/
BS1 part 60
/
Cnet 2.60 d2.adf
/
programming
/
README!
< prev
next >
Wrap
Text File
|
1993-02-10
|
3KB
|
71 lines
The files in this subdirectory have been provided for C programmers to
create their own C programs for use while ONLINE CNet AMIGA. Some
knowledge of the C language is required to make any use of these files.
CNet was compiled with the SAS/C Lattice C compiler. Although the files
on this disk are easily used with any other compiler, compiler-specific
features have been used where necessary.
Here's a description of the files provided here:
CNET.H
This is CNet's main "HEADER" file. It contains definitions of all
structures and variable types as used throughout CNet.
CNETFUNCS.H
This file contains ANSI prototypes for all CNet's internal functions. Only
a handful of these may be used as call-backs to the main program while your
program is running.
MINREXX.H
This file contains the AREXX interface structures. This will be of little
use to most C programmers but is provided for completeness.
XPROTO.H
This file contains the structure definitions and function prototypes for
CNet's XPR protocol interface. This will provided for completeness.
EMPTY.C
A bare-bones program shell which provides the machinery for getting in and
out of the external program. It contains call back routines for ALL of the
call-back functions that are currently supported.
INS.C
This is the pre-compiler include file. All include files are requested
here. This will be used to create a pre-compiled header file for fast
compilation.
How to compile a program using SAS/C Lattice C:
First, create the pre-compiled header file "i" by using the command:
lc -ph -oi ins
You need only do this once. It must be repeated if any of the above ".H"
files change. Next, compile your program using:
lc -Hi -rr -O -v -L -mact -ccft empty
where you replace "empty" with the actual name of your program.
Notes:
While your C pfile is running, you have access to ALL of CNet's variables.
The variable 'z' provides a pointer to the current port's PortData
structure (see CNET.H). The variable 'myp' provides a pointer to the
system's MainPort structure (again, see CNET.H). As an example, to
display the current user's name, the code:
PutText( z->user1.Handle );
is effective. To display what the user on port 1 is doing, the code:
PutText( myp->PortDoing[1] );
will work--this assumes there IS someone on port 1!
Programming in CNet's C environment provides you with a lot of power. If
you have questions about specific variables, feel free to contact the
support BBS as noted in the manual.